/**
 * Author:delan(delan@itwlw.com)
 * Date: 2016/2/4 11:15
 * Description:
 * Copyright(c) 2015 Woqu Interactive Co.Ltd
 */

var app = angular.module("myNoteApp", []);

app.controller("myNoteCtrl", function($scope) {
    $scope.message = "";
    $scope.left  = function() {return 100 - $scope.message.length;};
    $scope.clear = function() {$scope.message = "";};
    $scope.save  = function() {
        window.localStorage.setItem('noteapp', $scope.message);
        alert("Note Saved");
    };

    $scope.read = function(){
        $scope.message = window.localStorage.getItem('noteapp');
    }
});
